
<template>
  <div>
      <el-button type="primary" @click="exportExcel">下载</el-button>
      <el-button type="primary" @click="exportExcel2">下载多个</el-button>
  </div>
</template>
​
<script>
export default {
  data() {
    return {};
  },
  methods: {
      exportExcel(){
        var url =  "http://127.0.0.1:3000/exportExcel";
        console.info(url);
        window.location = url;//这里不能使用get方法跳转，否则下载不成功
      },
      exportExcel2(){
        var url =  "http://127.0.0.1:3000/exportExcelxx";
        console.info(url);
        window.location = url;//这里不能使用get方法跳转，否则下载不成功
      }
  },
  mounted() {
    
  }
};
</script>
​
<style scoped>
</style>